package com.albert.java_log4j_demo;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

import static java.util.stream.Collectors.toList;

public class StreamDemo {
    public static void main(String[] args) {
        List<String> aa = new ArrayList<>();
        aa.add("hello");
        aa.add("world");

        aa.stream().map(s -> s.split(" "))
                .distinct()
                .collect(toList());
        System.out.println(aa);
    }
}
